home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 60 / IOPROG_60.ISO / soft / c++ / gsl-1.1.1-setup.exe / {app} / src / specfunc / eval.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-08-22  |  433 b   |  18 lines

  1. /* evaluate a function discarding the status value in a modifiable way */
  2.  
  3. #define EVAL_RESULT(fn) \
  4.    gsl_sf_result result; \
  5.    int status = fn; \
  6.    if (status != GSL_SUCCESS) { \
  7.      GSL_ERROR_VAL(#fn, status, result.val); \
  8.    } ; \
  9.    return result.val;
  10.  
  11. #define EVAL_DOUBLE(fn) \
  12.    int status = fn; \
  13.    if (status != GSL_SUCCESS) { \
  14.      GSL_ERROR_VAL(#fn, status, result); \
  15.    } ; \
  16.    return result;
  17.  
  18.